package ch08_Swing高级组件.dialog;

import ch07_GUI编程.BaseFrame;

import javax.swing.*;
import java.awt.*;

public class JDialogDemo {
	public static void main(String[] args) {
		BaseFrame f = new BaseFrame("JDialog Demo");
		JLabel tip = new JLabel();
		tip.setHorizontalAlignment(SwingConstants.CENTER);
		f.setLayout(new BorderLayout());
		f.add(tip,BorderLayout.NORTH);
		f.setLocationRelativeTo(null);
		f.showMe();

		LoginDialog d = new LoginDialog(f);
		d.setSize(200, 130);
		d.setLocationRelativeTo(f);
		d.setVisible(true);

		tip.setText("关闭了登录对话框");
	}
}
